From: Daniel van Vugt Date: Wed, 17 Aug 2022 08:26:28 +0000 (+0800) Subject: calendar: Use connectObject on _sectionList X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~452^2^2~57 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4f3b1c51cfbacd4e3b38f832dc30d3fbe29f9aa3;p=gnome-shell.git calendar: Use connectObject on _sectionList This prevents _sync() being called after actor destruction (since actor destruction became more reliable in mutter@3d94c7cc2) and so eliminates this shutdown error: ``` (gnome-shell:35197): Gjs-CRITICAL **: 16:31:02.769: Object .Gjs_ui_calendar_Placeholder (0x559ed6e547e0), has been already disposed — impossible to set any property on it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs. == Stack trace for context 0x559ed6022310 == #0 559ed783c5a8 i resource:///org/gnome/shell/ui/calendar.js:1012 (31955be5fc90 @ 148) #1 7ffef8f38230 b self-hosted:1178 (32af8f6b0c40 @ 454) #2 559ed783c518 i resource:///org/gnome/shell/ui/popupMenu.js:806 (31955be18ce0 @ 52) #3 559ed783c488 i resource:///org/gnome/shell/ui/popupMenu.js:954 (31955be190b0 @ 168) #4 559ed783c3f8 i resource:///org/gnome/shell/ui/panelMenu.js:189 (31955be88150 @ 41) #5 7ffef8f3de60 b self-hosted:1178 (32af8f6b0c40 @ 423) ``` Part-of: --- diff --git a/js/ui/calendar.js b/js/ui/calendar.js index 9981a456f..90ef9cc95 100644 --- a/js/ui/calendar.js +++ b/js/ui/calendar.js @@ -976,8 +976,10 @@ class CalendarMessageList extends St.Widget { y_expand: true, y_align: Clutter.ActorAlign.START, }); - this._sectionList.connect('actor-added', this._sync.bind(this)); - this._sectionList.connect('actor-removed', this._sync.bind(this)); + this._sectionList.connectObject( + 'actor-added', this._sync.bind(this), + 'actor-removed', this._sync.bind(this), + this); this._scrollView.add_actor(this._sectionList); this._mediaSection = new Mpris.MediaSection();